<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>jQuery formValidator表单验证插件</title>
<meta name="description" content="jQuery formValidator表单验证插件" />
<link type="text/css" rel="stylesheet" href="style/validatorTidyMode.css" />
<script src="jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="formValidator-4.0.1.js" type="text/javascript"></script>
<script src="formValidatorRegex.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
	$.formValidator.initConfig({
	formID:"form1",
	onError:function(msg){alert(msg)}
  });
	$("#us").formValidator({
		onShow:"请输入用户名",
		onFocus:"用户名至少6个字符,最多10个字符",
		onCorrect:"该用户名可以注册"})
	.inputValidator({
		min:6,
		max:10,
		onError:"你输入的用户名非法,请确认"});
});
</script>
<style type="text/css" media="all">
body,div{font-size:12px;}
</style>
</head>

<body>
<form action="" method="post" name="form1" id="form1">
 
     用户名:<input type="text" id="us" name="us" style="width:120px"/>
	 <span id="usTip"></span>

  <br />
  
    <input type="submit" name="button" id="button" value="提交" />
  
</form>
</body>
</html>
